<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>LoveTemperature</title>
		<meta name="author" content="ningzero"/>

		<!-- CSS -->
		<link rel="stylesheet" href="../css/editOrder.css">
		<link rel="stylesheet" href="../css/jquery-ui.min.css">
		<!-- end CSS-->

	</head>

	<body>

		<div id="container">
			<header class="header">
				<div id="login_cart_bar">
					<div id="loginRegisterDiv">
						您好，<s:property value="#session.user.name" />
						<a class="pinkAnchor" href="http://localhost:8080/lovetemperature/sale/logout">退出登录</a>
					</div>
				</div>
				<div id="logo_bar">
					<img src="../img/logo.gif"/>
					<img id="logo_text" src="../img/logo2.png"/>
				</div>
				<div id="nav_bar">
					<ul>
						<li class="nav_padding_left"></li>
						<li class='shouye'>
							<a href="http://localhost:8080/lovetemperature/sysadmin/showShop">店面管理</a>
						</li>
						<li class='dangao'>
							<a href="http://localhost:8080/lovetemperature/sysadmin/showStaff">员工管理</a>
						</li>
						<li class='mianbao'>
							<a href="http://localhost:8080/lovetemperature/sysadmin/showMember">会员管理</a>
						</li>
					</ul>
				</div>
			</header>
			<div id="mainContent" class="mainContent">
				<form action="http://localhost:8080/lovetemperature/sysadmin/submitMember" id="form">
				<div id="extraInfoDiv">
					<h4>会员信息</h4>
					<p>　　姓名：<input type="text" value='<s:property value="member.name" />' name="member.name"/></p>
					<p>　　性别：<s:select list="candidateSexes" name="member.sex" /></p>
					<p>　　年龄：<input type="text" value='<s:property value="member.age" />' name="member.age"/></p>
					<p>联系电话：<input type="text" value='<s:property value="member.phone" />' name="member.phone"/></p>
					<p>联系地址：<input type="text" value='<s:property value="member.address" />' name="member.address"/></p>
					<p>电子邮箱：<input type="text" value='<s:property value="member.email" />' name="member.email"/></p>
					<p>登录密码：<input type="password" name='password' id="password1"/></p>
					<p>再次输入：<input type="password" name='passwordTwo' id="password2"/></p>
					<p>会员状态：<span><s:select list="candidateStates" name="member.state" /></span></p>
					<h4>余额信息</h4>
					<p>上次充值时间：<span><input name="member.lastPay" type="text" id="lastPay" onkeypress="javascript:return false" value='<s:property value="member.lastPay" />'/></span></p>
					<p>会员有效期至：<span><input name="member.untilDate" type="text" id="untilDate" onkeypress="javascript:return false" value='<s:property value="member.untilDate" />'/></span></p>
					
					<p>　　账户余额：￥<span><input type="text" value='<s:property value="member.balance" />' name="member.balance"/></span></p>
				</div>
				<input type="hidden" id="memberId" name="memberId">
				</form>
				<div id="payDiv">
					<div class="normalBtn" onclick="javascript:history.back(-1);">返回</div>
					<div class="normalBtn" onclick="submit()">保存修改</div>
				</div>
			</div>
		</div>
		<!--! end of #container -->
		
		<footer id="footer">
			<img src="../img/tmp/tmpfooter.png" />
		</footer>

		<!-- scripts -->
		<script type="text/javascript" src="../js/libs/jquery-1.9.1.min.js" ></script>
		<script type="text/javascript" src="../js/libs/jquery-ui.min.js" ></script>
		<script type="text/javascript" src="../js/libs/jquery.ui.datepicker.js" ></script>
		<script type="text/javascript" src="../js/libs/jquery.ui.datepicker-zh-CN.js" ></script>
		<script type="text/javascript" src="../js/util.js" ></script>
		<script type="text/javascript" src="../js/index.js" ></script>
		<script>
			$(function(){
				$("#lastPay").datepicker();
				$("#untilDate").datepicker();
			});
			function submit(){
				var lastPayDate = $("#lastPay").datepicker('getDate');
				$('#lastPay').val(lastPayDate);
				
				var untilDateDate = $("#untilDate").datepicker('getDate');
				$('#untilDate').val(untilDateDate);
				
				$('#memberId').val('<s:property value="member.memberId" />');
				$('#form').submit();
			}
		</script>
		<!-- end scripts-->
	</body>
</html>
